
<template>
	<button
		@click="appStore.toggleTheme"
		class="p-2 rounded-full bg-gray-200 dark:bg-gray-700"
	>
		<DarkIcon v-if="appStore.theme === 'light'" />
		<LightIcon v-else />
	</button>
</template>

<script setup lang="ts">
import { useAppStore } from "@/store/modules/app";
import LightIcon from "./icon/LightIcon.vue";
import DarkIcon from "./icon/DarkIcon.vue";
const appStore = useAppStore();
</script>
